<?php
/**
 * @package WordPress
 * @subpackage Default_Theme
 */

get_header(); ?>

<div id="content" class="" role="main">
    <div class="pages" id="contenttop">
        <ul class="menu column">
        </ul>
        <div class="column" id="contenttopright">
        <?php
          query_posts( array( 'pagename' => 'home') );
          the_post();
          the_content();
        ?>
        </div>
        <div class="clear"></div>
    </div>
    <div id="contentbottom">
        <div id="gettwicture" onclick="javascript:generator();">
            <div id="gettwicturetxt">Get twicture</div>
            <div id="gettwictureimg"><img src="<?bloginfo('template_url')?>/images/gettwicture-plus.jpg" alt=""></div>
        </div>
        <div id="generator" class="hide">
            <div id="generator-bottom">
                <?php
            $widget=new WpTwicturesSearchWidget();
            $widget->TwicturesSearchWidget->showWidget('');
                ?>
            </div>
        </div>
    </div>
</div>

<?php //get_sidebar(); ?>

<?php get_footer(); ?>

<script type="text/javascript">
jQuery(document).ready(function($) {
  var menu = $('ul.menu');

  var page_id = 1;

  $('div.inline-post').each(function () {
    var title = $(this).children('h1')[0];

    $(this).attr('id', 'page-' + page_id);

    $('<li><a href="#page-' + page_id + '">' + $(title).text() + '</a></li>').appendTo(menu);

    page_id++;
  });

  $('div.pages').tabs({
    selected: -1,
    select: function () {
      $('div.slideshow').remove();
    }
  });
});

    function generator() {
        if (jQuery('#generator').hasClass('hide')) {
            jQuery('#generator').removeClass('hide');
            jQuery('#gettwictureimg img').attr('src',"<?bloginfo('template_url')?>/images/gettwicture-minus.jpg")
        } else {
            jQuery('#generator').addClass('hide');
            jQuery('#gettwictureimg img').attr('src',"<?bloginfo('template_url')?>/images/gettwicture-plus.jpg")
        }
        jQuery('a').blur(); // remove border 
    }
</script>